.chat-popup {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 1000;
}

.chat-popup-other-pages {
  z-index: 1000;
  position: relative;
}

.open-chat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background-color: #1699e2;
  color: white;
  border-radius: 8px;
  padding-right: 15px;
  padding-left: 15px;
  font-weight: bold;
  border: none;
  margin-bottom: 1.5rem;
  margin-right: 1.5rem;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.close-chat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background-color: #1699e2;
  color: white;
  border-radius: 8px;
  padding-right: 15px;
  padding-left: 15px;
  border: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.sparkles-icon {
  width: 20px;
  height: 20px;
  fill: white;
  margin-top: 3px;
  margin-right: 5px;
}

.chat-window {
  width: 100%;
  max-width: 500px;
  border: 1px solid #ccc;
  background-color: #fff;
  padding: 15px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  min-height: 50vh;
  height: auto;
  overflow: auto;
  border-radius: 10px;
}

.close-icon {
  width: 23px;
  height: 23px;
  margin-top: 5px;
  fill: white;
  margin-right: 3px;
}

.formatted-text {
  white-space: pre-line;
  color: #333;
}

.messages-container pre {
  background-color: #8f8f8f;
}

.formatted-text a {
  color: blue;
  text-decoration: underline;
}

.messages-container {
  overflow-y: auto;
  flex: 1;
}

.chat-popup .message {
  border-radius: 8px;
  padding: 10px 15px;
  margin: 5px 0;
  max-width: 80%;
}

.user-message-container,
.bot-message-container {
  width: 100%;
  margin: 3px 0;
}

.user-message-container {
  display: flex;
  justify-content: flex-end;
}

.bot-message-container {
  display: flex;
  justify-content: flex-start;
}

.user-message,
.bot-message {
  display: block;
}

.user-message {
  text-align: right;
  background-color: #1699e2;
  color: white;
  border-top-right-radius: 0;
}

.bot-message {
  text-align: left;
  background-color: #e9e9e9;
  border-top-left-radius: 0;
}

.responding-message {
}

.chat-popup input {
  width: 80%;
  padding: 10px;
  border-radius: 5px 0 0 5px;
  border: 1px solid #ccc;
  outline: none;
  height: 40px;
  box-sizing: border-box;
  flex: 1;
}

.chat-popup .input-container {
  display: flex;
  margin-top: auto;
  width: 100%;
  font-size: 16px;
  background-color: #fff;
}

.chat-popup .input-text {
  font-size: 16px;
  color: #333;
  background-color: white;
}

.chat-popup .input-text:disabled {
  background-color: #eeeeee !important;
}

.chat-popup .input-button {
  background-color: #1699e2;
  color: white;
  padding-left: 15px;
  padding-right: 15px;
  border: none;
  height: 40px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

.chat-popup #bad-response-form .thumbs-down-button {
  background-color: transparent;
  border: none;
}

.chat-popup .bad-response-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px;
  margin-bottom: 10px;
}

.chat-popup .bad-response-form textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
}

.chat-popup .feedback-submit-button {
  background-color: #1699e2;
  color: white;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  border: none;
  align-self: flex-end;
}

.chat-popup .input-button:disabled {
  background-color: #ababab;
}

.chat-popup .info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  background-color: #1699e2;
  border-radius: 8px 8px 0 0;
  padding: 10px 15px;
}

.bot-name-pic-container {
  display: flex;
  color: white;
  height: 30px;
}

.bot-name {
  margin-right: 10px;
  font-weight: bold;
  font-size: 1.2rem;
}

.bot-pic {
  border-radius: 50%;
}

.clear-button {
  background-color: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
}

html[data-theme='dark'] .messages-container code {
  background-color: #e0e0e0;
}

.chat-popup.minimized .chat-window {
  transition: right 0.3s ease-in-out;
}

.minimize-chat-button {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #1699e2;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0 0 0 10px; /* Rounded corner on the bottom-left */
}

/* Additional styling for buttons and chat window when it is minimized */
.chat-popup.minimized .minimize-chat-button {
  right: 350px; /* Adjust based on your chat window width */
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
